/*
 * @Descripttion: 
 * @version: 
 * @Author: yuanliutech
 * @Date: 2022-10-31 15:27:53
 * @LastEditors: yuanliutech@lwj
 * @LastEditTime: 2023-01-04 19:04:34
 */
const app = getApp()
Component({
  properties: {
    title: {
      type: String,
      value: true
    },
    titleColor: {
      type: String,
      value: false
    },
    showBack: {
      type: Boolean,
      value: true
    },
    iconName: {
      type: String,
      value: 'arrow-left'
    },
    edit: {
      type: Boolean,
      value: false
    },
    editInfo:{
      type: Object,
      value: {}
    },
    backgroundColor:{
      type: String,
      value: 'transparent'
    }
  },
  data: {
    top: app.globalData.navMarginTop,
    height: app.globalData.navBarHeight,
  },
  lifetimes: {
    attached: function () {},
  },
  methods: {
    goBack() {
      if (this.properties.showBack) {
        wx.navigateBack()
      }
    },
    goEdit(){
      // console.log(this.data.editInfo,'editInfo');
      wx.navigateTo({
        url: `/packageC/pages/device/edit/edit?editInfo=${JSON.stringify(this.data.editInfo)}`,
      })
    },
  }
});